﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class FavoriteShopInfoConfig : EntityTypeConfiguration<FavoriteShopInfo>
    {
        public FavoriteShopInfoConfig()
        {
            ToTable("Himall_FavoriteShops");
            Property(item => item.Tags).HasColumnType("varchar").HasMaxLength(200);
            HasRequired(x => x.MemberInfo).WithMany(x => x.Himall_FavoriteShops).HasForeignKey(x => x.UserId);
            HasRequired(x => x.Himall_Shops).WithMany(x => x.Himall_FavoriteShops).HasForeignKey(x => x.ShopId);
        }
    }
}
